SOURCE=callbacks.cc  iochannel.cc  iosocket.cc  main.cc       socket.cc \
       fork.cc       iosignal.cc   loadsave.cc  pidbyname.cc  sound.cc


INCLUDE=callbacks.h  header.h     iosignal.h  loadsave.h   socket.h \
	fork.h       iochannel.h  iosocket.h  pidbyname.h  sound.h


OBJ=$(SOURCE:.cc=.o)

BASEFLAGS= -O2 -Wall
CFLAGS= ${BASEFLAGS} `pkg-config --cflags gtk+-2.0` 
LDFLAGS=${BASEFLAGS} `pkg-config --libs gtk+-2.0`

CC=g++

TARGET=feidian_monitor


all:${TARGET}

${TARGET}: ${OBJ}
	${CC} ${LDFLAGS} -o ${TARGET} ${OBJ}

install:
	install -D feidian_monitor /usr/local/bin/feidian_monitor 

uninstall:
	rm -f /usr/local/bin/feidian_monitor

clean:
	rm -f $(OBJ) *~


%.o:    %.cc
	${CC} ${CFLAGS} -c $< -o $@
					
